package com.project.slsx.utils;

import android.text.TextUtils;

import com.alibaba.fastjson.JSONObject;
import com.project.slsx.Constant.Constans;
import com.project.slsx.bean.UsersBean;

public class UserManager {
    public static void saveUser(String msg) {
        SPUtils.getInstance().put(Constans.USERS, msg);
    }

    public static UsersBean getUser() {
        UsersBean usersBean = null;
        String userStr = SPUtils.getInstance().getString(Constans.USERS);
        if (!TextUtils.isEmpty(userStr)) {
            usersBean = JSONObject.parseObject(userStr, UsersBean.class);
        }
        return usersBean;
    }

}
